package com.appkubes.mall.admin.application.customer.taobao.service.impl;

import com.appkubes.mall.admin.application.customer.taobao.service.CustomerToabaoService;
import com.appkubes.mall.core.entity.MallCustomerTaobao;
import com.appkubes.mall.core.service.impl.BaseMallCustomerTaobaoServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @Author: Rongjie
 * @Date: 2020/3/4
 * @Description:
 */
@Service
public class CustomerToabaoServiceImpl extends BaseMallCustomerTaobaoServiceImpl implements CustomerToabaoService {

    @Override
    public Boolean modifyAlipayInfo(String customerKey, String alipayAccount, String alipayName) {
        MallCustomerTaobao entity = new MallCustomerTaobao();
        entity.setCustomerKey(customerKey);
        entity.setAlipay(alipayAccount);
        entity.setAlipayName(alipayName);
        return this.updateById(entity);
    }

    @Override
    public Boolean bindPid(String customerKey, String pid) {
        MallCustomerTaobao entity = new MallCustomerTaobao();
        entity.setCustomerKey(customerKey);
        entity.setPid(pid);
        return this.updateById(entity);
    }
}
